context_x11 = GDK_X11_GL_CONTEXT (context);
- window = gdk_gl_context_get_window (context);
-
- // If the WM is compositing there is no particular need to delay
- // the swap when drawing on the offscreen, rendering to the screen
- // happens later anyway, and its up to the compositor to sync that
- // to the vblank.
- screen = gdk_window_get_screen (window);
- do_frame_sync = ! gdk_screen_is_composited (screen);
-
- context_x11->do_frame_sync = do_frame_sync;
-
GDK_NOTE (OPENGL,
g_print ("Making GLX context current to drawable %lu\n",
(unsigned long) context_x11->drawable));
if (context_x11->is_attached && GDK_X11_DISPLAY (display)->has_glx_swap_interval)
{
+ window = gdk_gl_context_get_window (context);
+
+ /* If the WM is compositing there is no particular need to delay
+ * the swap when drawing on the offscreen, rendering to the screen
+ * happens later anyway, and its up to the compositor to sync that
+ * to the vblank. */
+ screen = gdk_window_get_screen (window);
+ do_frame_sync = ! gdk_screen_is_composited (screen);
+
+ context_x11->do_frame_sync = do_frame_sync;
+
if (context_x11->do_frame_sync)
glXSwapIntervalSGI (1);
else